From golang:1.12.4 as build

ENV GOPROXY https://goproxy.io
ENV GO111MODULE on

WORKDIR $GOPATH/src/ginudpserver
COPY . $GOPATH/src/ginudpserver

ADD go.mod .
ADD go.sum .
RUN go mod download

#ADD . .

RUN go build .
#RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -installsuffix cgo -o ginudp  main.go

EXPOSE 7000
EXPOSE 8080
ENTRYPOINT ["./ginudpserver"] 





